package com.pic.mgt.unit;

import java.io.File;
import java.util.Date;

public abstract class Message extends Unit {
	private File transactionFile;
	private File confirmationFileForTxFile;
	private Date transactionTime;
	
	@Override
	public String getUnitName() {
		if (null == this.transactionFile) {
			return null;
		}
		else {
			return this.transactionFile.getName();
		}
	}
	
	public String getTransactionFilename() {
		return this.transactionFile.getName();
	}
	
	public long getTransactionFilesize() {
		return this.transactionFile.length();
	}
	
	// --- getter and setter ---
	
	public File getTransactionFile() {
		return transactionFile;
	}

	public void setTransactionFile(File transactionFile) {
		this.transactionFile = transactionFile;
	}

	public Date getTransactionTime() {
		return transactionTime;
	}

	public void setTransactionTime(Date transactionTime) {
		this.transactionTime = transactionTime;
	}

	public File getConfirmationFileForTxFile() {
		return confirmationFileForTxFile;
	}

	public void setConfirmationFileForTxFile(File confirmationFileForTxFile) {
		this.confirmationFileForTxFile = confirmationFileForTxFile;
	}
}
